<?php
namespace Models;

/**
 * @author Evgeny Baranov <evgeny@baranov.eu>
 */
class Attachment extends Base {
    const TYPE_BANNER = 1;

    protected $id;
    protected $article_id;
    protected $name;
    protected $description;
    protected $mime;
    protected $size;
    protected $type;
    protected $data;


    public function toArray() {
        return array_merge(parent::toArray(), array(
            'id' => $this->id,
            'name' => $this->name,
            'description' => $this->description,
            'mime' => $this->mime,
            'article_id' => $this->article_id,
            'size' => $this->size,
            'type' => $this->type
        ));
    }

    public function getId() {
        return intval($this->id);
    }

    public function getArticleId() {
        return $this->article_id;
    }

    public function getType() {
        return $this->type;
    }

    public function getData() {
        return $this->data;
    }

    public function getMIME() {
        return $this->mime;
    }

    public function getName() {
        return $this->name;
    }

    public function getSize() {
        return $this->size;
    }
}